test: add contract event emission tests for all state-changing functions#2
Open
devUnixx wants to merge 151 commits into
Open
test: add contract event emission tests for all state-changing functions#2devUnixx wants to merge 151 commits into
devUnixx wants to merge 151 commits into
Conversation
- Hardware requirements (Ed25519 key storage, HSM/TPM recommendations) - API integration steps (key gen, hash, sign, submit) - Reference scripts documented - Certification checklist for new meter models - Contact information for integration support Closes AnnabelJoe#320
…belJoe#306) - npm: weekly on Monday, patch/minor grouped, major flagged for review - Cargo: weekly on Monday, patch/minor grouped, major flagged for review - GitHub Actions: monthly, major flagged for review - Auto-merge for patch-level updates already wired via dependabot-auto-merge.yml Closes AnnabelJoe#306
- web: 1 GB memory / 1.0 CPU (256 MB / 0.25 CPU reserved) - supabase-db: 512 MB memory / 0.5 CPU (128 MB / 0.1 CPU reserved) - redis: 128 MB memory / 0.25 CPU (32 MB / 0.05 CPU reserved) - README updated with minimum host requirements table Closes AnnabelJoe#304
- docs/runbooks/contract-deployment.md: testnet/mainnet deploy, verify, rollback - docs/runbooks/meter-key-rotation.md: scheduled and emergency key rotation - docs/runbooks/failed-mint-investigation.md: diagnose and retry failed mints - docs/runbooks/incident-response.md: triage, containment, resolution, postmortem - docs/runbooks/README.md: index of all runbooks Closes AnnabelJoe#315
- Enable test task caching in turbo.json (was cache: false) - Add TURBO_TOKEN/TURBO_TEAM env vars to all CI steps (test, contracts fmt/clippy/test) - Remote cache signature verification already enabled
…ons (AnnabelJoe#330) - energy_token: mint, transfer, burn, retire event tests - audit_registry: anchor event test (topics + data fields verified) - community_governance: propose, vote, finalize, execute event tests - Each test verifies event topic and data payload fields
🔍 Vercel Preview DeploymentURL: Learn More: https://err.sh/vercel/no-credentials-found
|
✅ pnpm audit |
✅ cargo audit |
…ation feat: log aggregation and retention
## [1.9.0](AnnabelJoe/solarproof@v1.8.2...v1.9.0) (2026-05-29) ### Features * configure log aggregation and retention ([AnnabelJoe#299](AnnabelJoe#299)) ([3ee0154](AnnabelJoe@3ee0154))
- Implement bucketed storage to reduce ledger entries - Move idempotency nonces to temporary storage - Remove redundant reading_hash from storage values - Update and expand test suite Closes AnnabelJoe#281
- Added guidance for quorum, thresholds, and durations - Included configurations for small, medium, and large DAOs - Linked guide from community_governance contract docs Closes AnnabelJoe#279
- Implement bucketed storage to reduce ledger entries - Move idempotency nonces to temporary storage - Remove redundant reading_hash from storage values - Update and expand test suite - Include regression test test_issue_281_bucket_collision Closes AnnabelJoe#281
…tion Add pagination and filtering to certificates
## [1.10.0](AnnabelJoe/solarproof@v1.9.0...v1.10.0) (2026-05-30) ### Features * add pagination and filtering to certificates [AnnabelJoe#258](AnnabelJoe#258) ([4d2bde0](AnnabelJoe@4d2bde0))
…boundaries Implement error boundary components
## [1.11.0](AnnabelJoe/solarproof@v1.10.0...v1.11.0) (2026-05-30) ### Features * implement global and section error boundaries [AnnabelJoe#256](AnnabelJoe#256) ([cc85f83](AnnabelJoe@cc85f83))
Add dark mode support to the web dashboard
…n-testing feat(testing): add mutation testing for Rust contracts and TS utiliti…
docs: add user guide for web dashboard (closes AnnabelJoe#317)
…s-ci ci: add dedicated Contracts CI workflow (AnnabelJoe#287)
…letons feat: add loading skeletons for async data fetches (AnnabelJoe#255)
…nbooks-315 docs: add operational runbooks
…hart-websocket feat(web): real-time energy chart with WebSocket + polling fallback
…omments docs(contracts): add Rust doc comments to all public contract functions
…checklist docs: Stellar mainnet deployment checklist and go-live plan
…ge-80 test(web): achieve 80% API route coverage with CI enforcement
…pgrade-timelock feat(contracts): add contract upgrade timelock tests
…ocation feat: implement meter key revocation mechanism
…istence ops: configure Redis persistence and eviction policy
…policy docs: create SECURITY.md with vulnerability disclosure policy
…-integration-guide-320 docs: add hardware meter integration guide
…etup-306 devops: configure Dependabot for npm, Cargo, and GitHub Actions
…rce-limits-304 devops: add resource limits to Docker Compose services
…he-297 feat: Turborepo remote caching for all CI steps
|
|
||
| const withNextIntl = createNextIntlPlugin('./src/i18n.ts') | ||
|
|
||
| const securityHeaders = [ |
| }, | ||
| ] | ||
|
|
||
| const securityHeaders = [ |
| * Tests for useWallet hook using the mock Freighter wallet. | ||
| * Runs headlessly in CI — no browser extension required. | ||
| */ | ||
| import { describe, it, expect, beforeEach, afterEach, vi } from 'vitest' |
| readings: { meter_id: 'meter-1' }, | ||
| } | ||
|
|
||
| function mockDb(data: unknown[], error: unknown = null, count = 1) { |
| #[test] | ||
| #[should_panic(expected = "no pending upgrade")] | ||
| fn cancel_upgrade_no_pending_panics() { | ||
| let (env, admin, client) = setup(); |
✅ cargo audit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes AnnabelJoe#330
Changes
Added event emission tests to all three Soroban contracts, verifying that correct events are emitted with the right topics and data fields for every state-changing function.
energy_token
test_mint_emits_event— verifies("mint",)topic with(to, amount)datatest_transfer_emits_event— verifies("transfer",)topic with(from, to, amount)datatest_burn_emits_event— verifies("burn",)topic with(from, amount)datatest_retire_emits_event— verifies("retire",)topic is emittedaudit_registry
test_anchor_emits_event— verifies("anchor",)topic with(reading_hash, ledger_sequence, timestamp)datacommunity_governance
test_propose_emits_event— verifies("propose",)topic with proposal IDtest_vote_emits_event— verifies("vote",)topic with(proposal_id, voter, approve)datatest_finalize_emits_event— verifies("final",)topic with(proposal_id, status)datatest_execute_emits_event— verifies("exec",)topic with proposal IDAcceptance criteria